<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <img src="img/1.jpg"/>
    <img src="http://www.baidu.com/a.jpg"/>
    <script>
        window.addEventListener("load",function(){
            console.log("load事件执行了，DOM与资源都加载完成了")
        },true);

        window.addEventListener("DOMContentLoaded",function(){
            console.log("DOMContentLoaded事件执行了,DOM已加载完成，可能还有资源未加载成功")
        },true);
    </script>
</body>
</html>